<%= javascript_include_tag '/javascripts/graph/highcharts', '/javascripts/graph/pie', '/javascripts/graph/themes/grid' %>

	<script type="text/javascript">
		var percentAll = {"Host unreachable" : 0, "RAM saturation" : 0, "WARNING ! disk almost full" : 0, "Disk full" : 0};
		
		var labelPercent = new Array();		
		var libellePie = new Array();
		var valuePie = new Array();
		
		<% @incidentsPie.each do |incidentpie| %>
			percentAll["<%= incidentpie.incident_type %>"] = <%= incidentpie.resultat %>;
			libellePie.push("<%= incidentpie.incident_type %>");
			valuePie.push(<%= incidentpie.resultat %>);
			labelPercent.push("<%= incidentpie.incident_type %>");
		<% end %>

		pie(libellePie, valuePie, "<%= @Computer.machine_name %>");
		
	</script>
	
<div data-role="page" data-theme="b">

	<div data-role="header" data-theme="b" data-position="fixed" data-id="foo">
		<%= link_to "Retour à l'acceuil", :action => "home" %>
		<h1><%= @title %></h1>
	</div><!-- /header -->
	
	<div data-role="content">
		<ul data-role="listview" data-inset="true" data-theme="c" data-dividertheme="b">
			<li data-role="list-divider">Liste des ordinateurs</li>
				
				<li>Id PC : <%= @Computer.id %></li>
				<li>Nom PC : <%= @Computer.machine_name %></li>
				<li>Adresse IP : <%= @Computer.ip_adr %></li>
				<li>Salle associé : <%= @Computer.room.room_name %></li>
		</ul> 
		<div id="pie_container" style="width:100%; height: 400px; margin-bottom: 20px;"></div>
	
	</div><!-- /content -->

	<div data-role="footer" data-theme="b">
		<h4>&copy VadorSupervision for Apple device</h4>
	</div><!-- /footer -->
</div>